import { _decorator, Component, Node } from 'cc';
import { Constants } from '../game/Constants';
import { EventListener } from '../core/EventListener';
const { ccclass, property } = _decorator;

@ccclass('AnimationEventListener')
export class AnimationEventListener extends Component {
    /** 敌人攻击事件 */
    public EnemyAtkEvent() {
        this.node.parent?.emit(Constants.Event_EnemyAtk);
    }

    /** 要塞攻击事件 */
    public FortressAtkEvent() {
        this.node.parent.parent.parent?.emit(Constants.Event_FortressAtk);
    }
}


